package own.stu.jobgib.playown.redis.lettuce;

import io.lettuce.core.RedisClient;
import io.lettuce.core.RedisFuture;
import io.lettuce.core.RedisURI;
import io.lettuce.core.api.async.RedisAsyncCommands;

import java.util.concurrent.ExecutionException;

public class Aown {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        RedisClient client = RedisClient.create(RedisURI.create("127.0.0.1", 6379));
        RedisAsyncCommands<String, String> asyncCommands = client.connect().async();

        RedisFuture<String> set = asyncCommands.set("k1", "v");
        System.out.println(set.get());
    }
}
